<template>
    <div class="customerInfo">
        <p class="c-title">公司信息:</p>

      <van-cell-group>
        <van-field
          :value="customerInfo.title"
          label="客户姓名:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.code!=false">
        <van-field
          :value="customerInfo.code"
          label="客户代码:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="暂无"
          label="客户代码:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>

      <van-cell-group v-if="customerInfo.level!=null">
        <van-field
          :value="customerInfo.level.level_name"
          label="客户等级:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="暂无等级"
          label="客户等级:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.zip!=false">
        <van-field
          :value="customerInfo.zip"
          label="邮编:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="邮编:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.fax!=false">
        <van-field
          :value="customerInfo.fax"
          label="传真:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="传真:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.regions_name!=false">
        <van-field
          :value="customerInfo.regions_name"
          label="所在区域:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="所在区域:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.address!=false">
        <van-field
          :value="customerInfo.address"
          label="详细地址:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="详细地址:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.remark!=false">
        <van-field
          :value="customerInfo.remark"
          label="备注:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="备注:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>

      <p class="c-title">个人信息:</p>
      <van-cell-group v-if="customerInfo.name!=false" >
        <van-field
          :value="customerInfo.name"
          label="联系人:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="联系人:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.job!=false">
        <van-field
          :value="customerInfo.job"
          label="职位:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="职位:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.mobile!=false">
        <van-field
          :value="customerInfo.mobile"
          label="联系人手机:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="联系人手机:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.phone!=false">
        <van-field
          :value="customerInfo.phone"
          label="公司电话:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="公司电话:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.email!=false">
        <van-field
          :value="customerInfo.email"
          label="Email:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="Email:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-if="customerInfo.qq!=false">
        <van-field
          :value="customerInfo.qq"
          label="QQ:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group v-else>
        <van-field
          value="未填写"
          label="qq:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>
      <van-cell-group >
        <van-field
          v-if="customerInfo.is_open==1"
          value="已开通"
          label="账号状态:"
          disabled
          class="c-vanCell"
        />
        <van-field
          v-else
          value="未开通"
          label="账号状态:"
          disabled
          class="c-vanCell"
        />
      </van-cell-group>

      <!--<p >账号信息:</p>-->
      <!---->
      <!--<van-cell-group v-if="customerInfo.account!=false">-->
        <!--<van-field-->
          <!--:value="customerInfo.account"-->
          <!--label="账号信息:"-->
          <!--disabled-->
          <!--class="c-vanCell"-->
        <!--/>-->
      <!--</van-cell-group>-->
      <!--<van-cell-group v-else>-->
        <!--<van-field-->
          <!--value="未填写"-->
          <!--label="账号信息:"-->
          <!--disabled-->
          <!--class="c-vanCell"-->
        <!--/>-->
      <!--</van-cell-group>-->

      <!--返回按钮-->
      <backs></backs>
    </div>
</template>

<script>
  import backs from "@/components/menu/backPrev";
    export default {
        name: "customerInfo",
        components: {
          backs
        },
        data(){
          return {
            customerInfo:"",
            checked:true,
            checked2:false
          }
        },
        methods:{
          getCustomerInfo(){
            var $this=this;
            this.$http.setting.get('/customer/'+$this.$route.params.kid)
              .then(function (response) {
                // console.log(response.data.data);
                $this.customerInfo=response.data.data;

              })
              .catch(function (error) {
                console.log(error);
              });
          }
        },
        mounted(){
          this.getCustomerInfo();
        }
    }
</script>

<style scoped>
  .customerInfo{
    -padding:0 10px;
    font-size:12px;

  }
  .customerInfo .van-cell{
    font-size:12px;
    line-height: inherit;
  }
  .customerInfo p{
    margin:0;
    text-align: left;
    padding:10px;
    font-size:14px;
    color:#ccc;
    background: #F8F8F8;
  }
  .customerInfo .van-hairline--top-bottom::after {
    border-width: 0;
    border-bottom:1px solid #e5e5e5;
  }

  .c-vanCell{
    /*font-weight: bold;*/
    font-size:14px!important;
  }
  .c-title{
    font-weight: bold;
    font-size:18px!important;
  }


</style>
